Release 10.1A: OpenEdge Development:
ADM and SmartObjects
The Application Debugger
The Debugger enables you to move automatically from object to super procedure, and from event publisher to subscriber. You can use this tool to follow the flow of control among the persistent procedures that make up an application.
![]()
To begin a debugging session for a SmartObject application:
- Choose a starting point for a debugging session by picking the event procedure where you want to start tracking the program flow. You can find this procedure in the Procedure Object Viewer.
- Create a local version of that event procedure or function in the SmartObject where you want to begin tracing behavior.
- In that procedure or function, insert the following statements before the
RUNSUPERstatement:
- Save this object and run the SmartWindow that contains it. The Debugger starts up the first time that procedure or function executes.
- When the Debugger starts up, use the
STEPcommand, which causes the Debugger to step into the super procedure version of that same procedure. This effectively puts a breakpoint at the start of an internal procedure or function in a super procedure without the necessity of editing the super procedure itself.Alternatively, if you run your Progress session with the
-debugalertstartup option, you can simply code a message statement in Step 3, instead of explicitly invoking the Debugger; for example:
Then, when you run your application and the message alert box appears, press the HELP button to see a stack trace of the Progress 4GL code and determine where you are in the application. If you now press the Debug button on the stack trace window and the OK button on the original message alert box, Progress invokes the Debugger to allow you to move through the application from that point. (If you do not want to enter the Debugger, do not press the Debug button.)
Debugger tips
Here are some useful notes for using the Debugger:
- When the Debugger is at a
RUNSUPERstatement, aSTEPcommand steps into the code in the next super procedure up the chain.- When the Debugger is at a
PUBLISHstatement, aSTEPcommand steps into the event procedure in the first subscriber for that event. Continuing toSTEPorNEXTthrough the code walks through all subscribers to that event.- To display what procedure is executing, use the
THIS-PROCEDURE:FILE-NAMEexpression.- To display the name of the SmartObject on whose behalf a super procedure routine is executing, use the
TARGET-PROCEDURE:FILE-NAMEexpression.- To display the name of the calling procedure, use the
SOURCE-PROCEDURE:FILE-NAMEexpression.- To ensure the Debugger has access to all procedures you want to walk through, add the
%DLC%\src(Windows) or$DLC/src(UNIX) directory to thePROPATHafter theguidirectory.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |